package Demo01;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        StringBuffer strb = new StringBuffer("abcd");
        StringBuilder strbd = new StringBuilder("abcd");



    }
    public static void main01(String[] args) {
        String str = new String("abcd");
        str += "ef";
        System.out.println(str);
    }

    public static void main02(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        int small = 0;
        int big  = 1;
        int count = 0;
        while (big<s.length()) {
            if(s.charAt(big)==' ') {
                count = big - small - 1;
                small=big;
            }
            big++;
        }
        if(s.charAt(s.length()-1) != ' ') {
            count = s.length()-1-small;
        }
        System.out.println(count);
    }
    public int StrToInt(String str) {
        int flg = 1;
        int count = 0;
        if(str.length()==0) {
            return 0;
        }
        if(str.charAt(0)=='-') {
            flg = -1;
        }
        for(int i = 0;i<str.length();i++) {
            if(str.charAt(i)<'0'||str.charAt(i)>'9') {
                return 0;
            }
            if(str.charAt(i)>='1'&&str.charAt(i)<='9') {
                count += (str.charAt(i)-'0')*Math.pow(10,(str.length()-i-1));
            }
        }
        return count*flg;
    }
}
